1. Field of the Invention
The present invention relates to optical mouse sensors, and more particularly, to a method and system for an optical mouse which can eliminate spurious motion.
2. Description of the Prior Art
An optical mouse is a well-known component of computer systems. It works by generating a representation of cursor motion on a display using image correlation. The optical mouse captures images of a surface, and compares the captured images to determine displacement between the two.
If a first image is designated a reference (R) image and a second image is designated a comparison (C) image, the image correlation procedure offsets C against R and computes a sum of the product between the overlapping area of C and R by using a correlation matrix. The correlation matrix calculates the displacement between R and C by shifting C around R at a predicted point. FIG. 1 is an illustration of the reference image, comparison image and the correlation matrix. As shown in the diagram, the correlation matrix is a 3×3 matrix, wherein element 5 is at the centre, and the correlation matrix is placed at the centre of the reference image R. As illustrated in FIG. 2A, element 5 is calculated by making C overlap fully with R, and summing each overlapping pixel. As illustrated in FIG. 2B, element 2 is calculated by shifting C up by 1 pixel, and summing the overlapped area. As illustrated in FIG. 2C, element 9 is calculated by shifting C down 1 pixel and to the right 1 pixel, and summing each overlapping pixel.
Once all elements are calculated, a largest element of this matrix determined as the correlation peak and is used to generate the displacement. In the example shown in FIG. 2, if the mouse is stationary then element 5 will be the correlation peak (C and R are identical so the largest summed value will be at the centre of the correlation matrix). If the mouse is moving directly to the right then element 6 will be the correlation peak. The cursor motion is computed according to the correlation peak offset.
The 3×3 matrix is usually sufficient for standard computer applications. In gaming applications, however, the mouse speed is significantly faster than when performing operations such as word processing. A ‘skating’ motion is often used resulting in spurious motion (true motion of the mouse not corresponding to the cursor display) as the actual motion of the mouse is beyond the 3×3 matrix, meaning the largest element of the 3×3 matrix will not be the true correlation peak.